from datetime import datetime
import random
import time


class AppUtil:
    @staticmethod
    def log(message):
        msg: str = "{0} {1}".format(AppUtil.timestamp(), str(message))
        print(msg)

    @staticmethod
    def random(start: float, end: float):
        return random.uniform(start, end)

    @staticmethod
    def timestamp() -> str:
        return datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")

    @staticmethod
    def sleep(secs: float):
        time.sleep(secs)
